import { ThemeConfig } from 'antd'

/**
 * 主题编辑器
 * @link https://ant-design.antgroup.com/theme-editor-cn
 *
 * 主题变量
 * @link https://ant-design.antgroup.com/docs/react/customize-theme-cn#seedtoken
 */
export const themeVars: Pick<ThemeConfig, 'token' | 'components'> = {
  token: {
    fontFamily: 'PingFang SC', // 同 src/global.less
    fontSize: 14, // 同 src/global.less
    lineHeight: 1.5, // 同 src/global.less
  },
  components: {
    Form: {
      itemMarginBottom: 16,
      verticalLabelPadding: 3,
    },
    Table: {
      borderColor: '#F1F1F4',
      headerBg: '#F8F9FA',
      headerBorderRadius: 8,
    },
    Badge: {
      statusSize: 8,
    },
    Layout: {
      bodyBg: 'transparent',
      footerBg: 'transparent',
      headerBg: 'transparent',
      lightSiderBg: 'transparent',
      lightTriggerBg: 'transparent',
    },
    Menu: {
      itemBg: 'transparent',
      subMenuItemBg: 'transparent',
      itemColor: 'var(--ant-color-text-secondary)',
      itemHoverColor: 'var(--ant-color-text)',
      itemSelectedColor: 'var(--ant-color-text)',
      itemSelectedBg: '#DBDFE9',
      itemActiveBg: '#DBDFE9',
    },
  },
}
